package com.xwj.sharding.dao;

import com.xwj.sharding.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xwj
 * @date 2020/3/2
 */
@Mapper
@Repository
public interface UserMapper {
    @Select("select * from user")
    List<User> list();

    @Insert("insert into user(username,password) values(#{username},#{password})")
    void add(User user);
}
